package com.itcncp.wechat.app.dao.model;

import java.io.Serializable;

public class ItcsRoadsectionInfo implements Serializable {
    /**
     * 收费路段编号 7位收费公路编号+3位路段顺序号+1位保留位（0），顺序码为所在公路省域段由北/东方向（环线由正北方向顺时针顺序）从001开始
     *
     * @mbg.generated
     */
    private String roadsectionId;

    private String roadOwnerId;

    private String tollRoadId;

    /**
     * 收费路段名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 1 — 经营性 2 — 还贷性
     *
     * @mbg.generated
     */
    private Byte type;

    /**
     * 路段里程 单位：m
     *
     * @mbg.generated
     */
    private Byte mileage;

    /**
     * 路段收费方式 1 &mdash; 开放式 2 &mdash; 封闭式 3 &mdash; 均一制
     *
     * @mbg.generated
     */
    private Byte chargeType;

    private static final long serialVersionUID = 1L;

    public String getRoadsectionId() {
        return roadsectionId;
    }

    public void setRoadsectionId(String roadsectionId) {
        this.roadsectionId = roadsectionId;
    }

    public String getRoadOwnerId() {
        return roadOwnerId;
    }

    public void setRoadOwnerId(String roadOwnerId) {
        this.roadOwnerId = roadOwnerId;
    }

    public String getTollRoadId() {
        return tollRoadId;
    }

    public void setTollRoadId(String tollRoadId) {
        this.tollRoadId = tollRoadId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public Byte getMileage() {
        return mileage;
    }

    public void setMileage(Byte mileage) {
        this.mileage = mileage;
    }

    public Byte getChargeType() {
        return chargeType;
    }

    public void setChargeType(Byte chargeType) {
        this.chargeType = chargeType;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", roadsectionId=").append(roadsectionId);
        sb.append(", roadOwnerId=").append(roadOwnerId);
        sb.append(", tollRoadId=").append(tollRoadId);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", mileage=").append(mileage);
        sb.append(", chargeType=").append(chargeType);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItcsRoadsectionInfo other = (ItcsRoadsectionInfo) that;
        return (this.getRoadsectionId() == null ? other.getRoadsectionId() == null : this.getRoadsectionId().equals(other.getRoadsectionId()))
            && (this.getRoadOwnerId() == null ? other.getRoadOwnerId() == null : this.getRoadOwnerId().equals(other.getRoadOwnerId()))
            && (this.getTollRoadId() == null ? other.getTollRoadId() == null : this.getTollRoadId().equals(other.getTollRoadId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getMileage() == null ? other.getMileage() == null : this.getMileage().equals(other.getMileage()))
            && (this.getChargeType() == null ? other.getChargeType() == null : this.getChargeType().equals(other.getChargeType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRoadsectionId() == null) ? 0 : getRoadsectionId().hashCode());
        result = prime * result + ((getRoadOwnerId() == null) ? 0 : getRoadOwnerId().hashCode());
        result = prime * result + ((getTollRoadId() == null) ? 0 : getTollRoadId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getMileage() == null) ? 0 : getMileage().hashCode());
        result = prime * result + ((getChargeType() == null) ? 0 : getChargeType().hashCode());
        return result;
    }
}